#include<bits/stdc++.h>
using namespace std;

// #define int long long
#define ls (p<<1)
#define rs (p<<1|1)
#define mid ((l+r)>>1)
#define ms0(a) memset(a,0,sizeof a)
#define msp(a) memset(a,0x3f,sizeof a)
#define msn(a) memset(a,-1,sizeof a)
#define mc(a,b) memcpy(a,b,sizeof b)
#define endl '\n'
#define pii pair<int,int>

constexpr int mod=1e9+7;
constexpr int N=1e5+7,M=1e5+7;
bool bg_m;
int Case=1;
inline void cmax(int &a,int b){a=a<b?b:a;}
inline void cmin(int &a,int b){a=a>b?b:a;}
inline int qp(int a,int b){int res=1;
while(b){if(b&1)res=1ll*res*a%mod;a=1ll*a*a%mod;b>>=1;}return res;}

int n;
int a[N],r;
int cur;
int ans;

void Main(){

    cin>>n;
    for(int i=1;i<=n;i++) cin>>r,a[r]++;
    ans=n;
    for(int i=1;i<=100000;i++){
        ans-=min(a[i],cur);
        cur-=min(a[i],cur);
        cur+=a[i];
    }
    cout<<ans<<endl;

    return;
}
string RdFile="duel";
bool en_m;
signed main(){
    freopen((RdFile+".in").c_str(),"r",stdin);
    freopen((RdFile+".out").c_str(),"w",stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    // cin>>Case;
    while(Case--) Main();
    // cerr<<(&en_m-&bg_m)/1024.0/1024<<endl;
    return 0;
}
/*
g++ duel.cpp -o duel -g -Wall -Wextra -Wshadow -fsanitize=address,undefined -std=c++14
g++ duel.cpp -o duel ‐O2 ‐std=c++14 ‐static
*/